<template>
  <div class="height-100-percent titan-empty">
    <a-empty :description="props.text">
      <template
        v-for="(item, key, i) in slots"
        :key="i"
        v-slot:[key]
      >
        <slot :name="key" />
      </template>
    </a-empty>
  </div>
</template>

<script setup lang="ts">
  import { useSlots } from "vue";

  defineOptions({
    name: "TitanEmpty",
  });

  interface Props {
    text?: string;
  }

  const props = withDefaults(defineProps<Props>(), {
    text: "暂无数据",
  });

  const slots = useSlots();
</script>

<style scoped></style>
